﻿using FreeSql.DataAnnotations;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SystemEntity
{
    /// <summary>
    /// 角色
    /// </summary>
    [Table(Name = "System_Role")]
    public partial class SystemRoleEntity
    {
        /// <summary>
        /// 主键
        /// </summary>
        [Column(IsPrimary = true)]
        public Guid Id { get; set; }
        ///// <summary>
        ///// 父角色Id（父包含子权限）
        ///// </summary>
        //public Guid ParentId { get; set; }
        /// <summary>
        /// 角色名称
        /// </summary>
        public string Name { get; set; }
        /// <summary>
        /// 备注
        /// </summary>
        public string Remark { get; set; }
        /// <summary>
        /// 角色为通用时部门Id为空，唯一角色时则对应具体部门
        /// </summary>
        public Guid DepartmentId { get; set; }
        /// <summary>
        /// 角色类型
        /// </summary>
        public RoleType RoleType { get; set; }
    }
    /// <summary>
    /// 角色类型
    /// </summary>
    public enum RoleType 
    {
        /// <summary>
        /// 通用
        /// </summary>
        Universal = 0 ,
        /// <summary>
        /// 唯一
        /// </summary>
        unique = 1
    }
}
